﻿using LDM.Framework.WebApiClientCore;
using LDM.Sys.ServiceAPI.Model.DBModel;
using LDM.Sys.ServiceAPI.Model.ViewModel.Request;
using LDM.Sys.ServiceAPI.Model.ViewModel.Response.Login;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebApiClientCore;
using WebApiClientCore.Attributes;
using HttpPostAttribute = WebApiClientCore.Attributes.HttpPostAttribute;

namespace LDM.Sys.ServiceAPI.Svc
{
    /// <summary>
    /// 后台管理登录服务
    /// </summary>
    [HttpApiOptions("LDM.Sys.API")]
    [LoggingFilter]
    [Timeout(10 * 1000)] // 10s超时
    public interface IAdminLoginService : IHttpApi, IScoped
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="loginReq"></param>
        /// <returns></returns>
        [HttpPost("AdminLogin/UserLogin")]
        public Task<LoginRes> Login([JsonContent] AdminLoginReq loginReq);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        [HttpPost("AdminLogin/GetUser")]
        public Task<SysAccount> GetUser();


    }
}
